import React from "react";
import ReactDOM from "react-dom";
import {Router,Route,hashHistory,IndexRoute} from "react-router";
import {Provider,connect} from "react-redux";
import store from "./store/store";

import App from "./modules/App";
import News from "./modules/News";
import Home from "./modules/Home";
import Goods from "./modules/Goods"
import Carts from "./modules/Carts";
import Comments from "./modules/Comments";


ReactDOM.render(
    <Provider store={store}>
        <Router histroy={hashHistory}>
            <Route path="/" component={App}>
                <IndexRoute component={Home}></IndexRoute>
                <Route path="/news" component={News}></Route>
                <Route path="/goods" component={Goods}></Route>
                <Route path="/carts" component={Carts}></Route>
                <Route path="/comments/:id" component={Comments}></Route>
            </Route>
        </Router>
    </Provider>
    ,
    document.getElementById("app")
)